package lt.hsu.login.controller.remote;

import io.swagger.v3.oas.annotations.Hidden;
import jakarta.validation.constraints.NotBlank;
import lombok.extern.slf4j.Slf4j;
import lt.hsu.req.UserInfo;
import lt.hsu.web.NoWrap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Validated
@RequestMapping("remote")
@Slf4j
@Hidden
public class RemoteUserController {


    @PostMapping("/user/findUser")
    @NoWrap
    public UserInfo findUser(@NotBlank(message = "用户名不能为空") @RequestParam("username") String username){
        UserInfo userInfo = new UserInfo();
        userInfo.setUsername(username);
        return userInfo;
    }

}
